package com.itbaizhan.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itbaizhan.service.LoginUserService;
import com.itbaizhan.domain.LoginUser;
import com.itbaizhan.mapper.LoginUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author 13487
* @description 针对表【tb_login_user】的数据库操作Service实现
* @createDate 2024-05-04 10:43:55
*/
@Service
public class LoginUserServiceImpl extends ServiceImpl<LoginUserMapper, LoginUser>
    implements LoginUserService {

    @Autowired
    private LoginUserMapper loginUserMapper;

    @Override
    public LoginUser getLoginUser(String username) {
        QueryWrapper<LoginUser> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_name", username);
        LoginUser loginUser = loginUserMapper.selectOne(queryWrapper);
        return loginUser;
    }
}




